<template>
    <div>
        <video id="video"></video>
    </div>
</template>

<script>
    'use strict';

    import flv from 'flv.js';

    export default {
        name: "LiveDemo",
        props: {},
        data() {
            return {
                flv: flv,
            }
        },
        computed: {},
        methods: {},
        created() {
        },
        mounted() {

            if (this.flv.isSupported()) {
                let video = document.getElementById('video');
                let flvPlayer = this.flv.createPlayer({
                    type: 'flv',
                    url: 'http://47.96.131.22:7001/live/chenxueli.flv'
                });
                flvPlayer.attachMediaElement(video);
                flvPlayer.load();
                flvPlayer.play();
            }

        }
    }
</script>

<style lang="scss" scoped>

</style>
